// import request from '../config'
import request from '../config/indexNew'

// // 列表
// export const getGroupChatNoticeList = (data: any) => {
//   const url = '/GroupChatNotice/List'
//   return request(url, data)
// }
// // 新建&编辑
// export const putGroupChatNotice = (data: any) => {
//   const url = '/GroupChatNotice/Put'
//   return request(url, data)
// }
// // 暂停
// export const pauseGroupChatNotice = (data: any) => {
//   const url = '/GroupChatNotice/Pause'
//   return request(url, data)
// }
// // 开始
// export const startGroupChatNotice = (data: any) => {
//   const url = '/GroupChatNotice/Start'
//   return request(url, data)
// }
// // 删除
// export const delGroupChatNotice = (data: any) => {
//   const url = '/GroupChatNotice/Del'
//   return request(url, data)
// }
// // 详情
// export const getGroupChatNoticeDetail = (data: any) => {
//   const url = '/GroupChatNotice/Detail'
//   return request(url, data)
// }
// // 详情-子列表
// export const getGroupChatNoticeDetailList = (data: any) => {
//   const url = '/GroupChatNotice/DetailList'
//   return request(url, data)
// }
// // 详情-子列表导出
// export const exportGroupChatNoticeDetail = (data: any) => {
//   const url = '/GroupChatNotice/DetailListExport'
//   return request(url, data)
// }
// // 详情重新发布
// export const retryGroupChatNotice = (data: any) => {
//   const url = '/GroupChatNotice/Retry'
//   return request(url, data)
// }
export const settingsGroupNotification = (data: any) => {
  return request({
    url: '/api/win-tool/GroupChatNotice/put-settings',
    method: 'POST',
    data
  })
}
// 查看设置
export const showSettingsGroupNotification = (data?: any) => {
  return request({
    url: '/api/win-tool/GroupChatNotice/get-settings',
    method: 'POST',
    data
  })
}
// 列表
export const getGroupChatNoticeList = (data: any) => {
  return request({
    url: '/api/win-tool/GroupChatNotice/List',
    method: 'POST',
    data
  })
}
// 新建&编辑
export const putGroupChatNotice = (data: any) => {
  return request({
    url: '/api/win-tool/GroupChatNotice/Put',
    method: 'POST',
    data
  })
}
// 暂停
export const pauseGroupChatNotice = (data: any) => {
  return request({
    url: '/api/win-tool/GroupChatNotice/Pause',
    method: 'POST',
    data
  })
}
// 开始
export const startGroupChatNotice = (data: any) => {
  return request({
    url: '/api/win-tool/GroupChatNotice/Start',
    method: 'POST',
    data
  })
}
// 删除
export const delGroupChatNotice = (data: any) => {
  return request({
    url: '/api/win-tool/GroupChatNotice/Del',
    method: 'POST',
    data
  })
}
// 详情
export const getGroupChatNoticeDetail = (data: any) => {
  return request({
    url: '/api/win-tool/GroupChatNotice/Detail',
    method: 'POST',
    data
  })
}
// 详情-子列表
export const getGroupChatNoticeDetailList = (data: any) => {
  return request({
    url: '/api/win-tool/GroupChatNotice/DetailList',
    method: 'POST',
    data
  })
}
// 详情-子列表导出
export const exportGroupChatNoticeDetail = (data: any) => {
  return request({
    url: '/api/win-tool/GroupChatNotice/DetailListExport',
    method: 'POST',
    data,
    responseType: 'arraybuffer'
  })
}
// 详情重新发布
export const retryGroupChatNotice = (data: any) => {
  return request({
    url: '/api/win-tool/GroupChatNotice/Retry',
    method: 'POST',
    data
  })
}



/**
 * 获取发布群公告预计群发客户数
 * @param data 
 * @returns 
 */
export const getGroupNoticeEstimatedNumber = (data: any) => {
    return request({
      url: '/api/win-tool/GroupChatNotice/expect',
      method: 'POST',
      data
    })
  }
